<!--
 * @Author: wangyuyong
 * @Date: 2020-07-19 10:51:54
 * @LastEditTime: 2020-07-22 12:59:01
 * @FilePath: /blog-manager/src/views/Home.vue
 * @Description: 
--> 
<template>
  <div>
    <el-menu :default-active="defaultActive" mode="horizontal" @select="handleSelect">
      <el-submenu index="1">
        <template slot="title">博客</template>
        <el-menu-item index="1-1">撰写博客</el-menu-item>
        <el-menu-item index="1-2">管理博客</el-menu-item>
        <el-menu-item index="1-3">撰写日记</el-menu-item>
        <el-menu-item index="1-4">管理日记</el-menu-item>
      </el-submenu>
      <el-menu-item index="2">标签</el-menu-item>
      <el-menu-item index="3">分类</el-menu-item>
    </el-menu>
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  name: "Home",
  data() {
    return {
      defaultActive: "1-1"
    };
  },
  components: {},
  methods: {
    handleSelect(key, keyPath) {
      console.log(key, keyPath);
    }
  }
};
</script>
